using System;
using System.Collections.Generic;

namespace ClientTools.Client.Library.Settings
{
    [Serializable]
    public class ClientTools
    {
        public List<Profile> Profiles { get; set; }

        public ClientTools()
        {
            Profiles = new List<Profile>();
        }

        public void DeleteProfile(Profile profile) 
        {
            Profiles.Remove(profile);
        }

        public Profile AddNewProfile()
        {
            var profile = new Profile
                              {
                                  ProfileName = "New profile - please rename",
                                  ProviderName = Provider.ProviderManager.ProviderInfos[0].ProviderName,
                                  ServiceUrl = "http://www.yourdomain.com/webservices/ClientToolsWebServices.asmx",
                                  DbConnectionString =
                                      "Server=SERVER;Database=DATABASENAME;User ID=USERNAME;Password=PASSWORD;Trusted_Connection=False",
                                  UmbracoPassword = "",
                                  UmbracoUserName = "UmbracoUsername"
                              };
            //profile.PackagerServiceUrl = "http://www.yourdomain.com/webservices/ClientToolsPackageService.asmx";

            Profiles.Add(profile);
            return profile;
        }
    }
}
